//
//  PLForgetPassViewController.swift
//  Panku
//
//  Created by mac on 2017/5/22.
//  Copyright © 2017年 Monster. All rights reserved.
//

import UIKit

class PLForgetPassViewController: PKBaseViewController {

    
    //MARK: - Properties
    //UI
    lazy var numberTextField = UITextField()
    lazy var verifiedCode = UITextField()
    lazy var newPassTextField = UITextField()
    lazy var newPassAgainTextField = UITextField()
    lazy var getVerifyCode = PKBaseButton.createButton()
    lazy var submitButton = PKBaseButton.createButton()
    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
    }
    
    override func viewWillAppear(_ animated: Bool) {
        self.navigationController?.setNavigationBarHidden(false, animated: animated)
        super.viewWillAppear(animated)
    }

    override func setupRootView() {
        view.backgroundColor = UIColor.white
    }
    
    override func setupSubViews() {
        view.addSubview(numberTextField)
        view.addSubview(verifiedCode)
        view.addSubview(newPassTextField)
        view.addSubview(newPassAgainTextField)
        view.addSubview(submitButton)
        view.addSubview(getVerifyCode)
        
        numberTextField.backgroundColor = UIColor.white
        numberTextField.dsl_textField_placeholderColor = UIColor(hexString: "747474")
        numberTextField.placeholder = "请输入你的手机号"
        numberTextField.font = UIFont.PKFont(Size: 14)
        
        verifiedCode.backgroundColor = UIColor.white
        verifiedCode.dsl_textField_placeholderColor = UIColor(hexString: "747474")
        verifiedCode.placeholder = "请输入你的验证码"
        verifiedCode.font = UIFont.PKFont(Size: 14)

        
        newPassTextField.backgroundColor = UIColor.white
        newPassTextField.dsl_textField_placeholderColor = UIColor(hexString: "747474")
        newPassTextField.placeholder = "请输入你的新密码"
        newPassTextField.font = UIFont.PKFont(Size: 14)

        
        newPassAgainTextField.backgroundColor = UIColor.white
        newPassAgainTextField.dsl_textField_placeholderColor = UIColor(hexString: "747474")
        newPassAgainTextField.placeholder = "请重新输入你的新密码"
        newPassAgainTextField.font = UIFont.PKFont(Size: 14)
        
        submitButton.setTitle("提交", for: .normal)
        submitButton.setTitleColor(UIColor.white, for: .normal)
        submitButton.backgroundColor = UIColor(hexString: "333333")
        submitButton.layer.cornerRadius = 5
        submitButton.layer.masksToBounds = true
        
        getVerifyCode.titleLabel?.font = UIFont.PKFont(Size: 9)
        getVerifyCode.setTitle("获取验证码", for: .normal)
        getVerifyCode.setTitleColor(UIColor.white, for: .normal)
        getVerifyCode.backgroundColor = UIColor(hexString: "333333")

    }
    
    override func setupSubViewsConstraints() {
        
        numberTextField.snp.makeConstraints { (make) in
            make.left.equalTo(view.snp.left)
            make.right.equalTo(view.snp.right)
            make.top.equalTo(view.snp.top).offset(80)
            make.height.equalTo(44)
            
        }
        
        verifiedCode.snp.makeConstraints { (make) in
            make.left.equalTo(view.snp.left)
            make.right.equalTo(view.snp.right)
            make.top.equalTo(numberTextField.snp.bottom).offset(20)
            make.height.equalTo(44)
            
        }
        
        newPassTextField.snp.makeConstraints { (make) in
            make.left.equalTo(view.snp.left)
            make.right.equalTo(view.snp.right)
            make.top.equalTo(verifiedCode.snp.bottom).offset(20)
            make.height.equalTo(44)
            
        }
        
        newPassAgainTextField.snp.makeConstraints { (make) in
            make.left.equalTo(view.snp.left)
            make.right.equalTo(view.snp.right)
            make.top.equalTo(newPassTextField.snp.bottom).offset(20)
            make.height.equalTo(44)
            
        }
        
        
        submitButton.snp.makeConstraints { (make) in
            make.centerX.equalTo(view.snp.centerX)
            make.width.equalTo(260)
            make.height.equalTo(40)
            make.top.equalTo(newPassAgainTextField.snp.bottom).offset(90)
        }
        
        getVerifyCode.snp.makeConstraints { (make) in
            make.centerY.equalTo(numberTextField.snp.centerY)
            make.right.equalTo(numberTextField.snp.right).offset(-20)
        }
    }
    
    override func setupNavigationBar() {
        title = "忘记密码"
    }
    
    override func bindViewModel() {
        
    }


}
